/* icintr1.i - EDIT TRANSACTIONS AFTER FINAL APPROVAL                         */
/* Copyright 1986 QAD Inc. All rights reserved.                               */
/* $Id:: icintr1.i 15200 2012-02-23 20:06:30Z myb                          $: */
/* $Revision: 1.10 $                                                           */
/*V8:ConvertMode=Maintenance                                                  */
/* REVISION: 7.3     LAST MODIFIED: 11/01/95    BY: ais *G0V9*                */
/* REVISION: 8.5     LAST MODIFIED: 07/02/96    BY: taf *J0WS*                */
/* REVISION: 8.5     LAST MODIFIED: 09/17/97    BY: *H1F9* Felcy D'Souza      */
/* REVISION: 8.6     LAST MODIFIED: 05/20/98    BY: *K1Q4* Alfred Tan         */
/* REVISION: 9.1     LAST MODIFIED: 08/13/00    BY: *N0KS* Mark Brown         */
/* Revision: 1.8  BY: Jean Miller DATE: 04/06/02 ECO: *P056* */
/* $Revision: 1.10 $ BY: Paul Donnelly (SB) DATE: 06/28/03 ECO: *Q00G* */
/*-Revision end---------------------------------------------------------------*/
 
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/
{us/gp/gpuid.i}
 
define variable temp_trans as character initial "ISS-WO".
define variable temp_um like pt_mstr.pt_um.
 
yn = no.
 
release lad_det.
 
for each sr_wkfl  where sr_wkfl.sr_domain = global_domain and  sr_userid =
SessionUniqueID
     and sr_lineid begins "ISS"
     and sr_qty <> 0
no-lock:
 
   /* PTP_DET IS ACCESSES TO CHECK WHETHER THE ITEM IS FLOOR STOCK */
   find ptp_det  where ptp_det.ptp_domain = global_domain and  ptp_part =
   substring(sr_lineid,4,18)
      and ptp_site = sr_site
   no-lock no-error.
 
   find first pt_mstr  where pt_mstr.pt_domain = global_domain and
   pt_mstr.pt_part = substring(sr_lineid,4,18)
   no-lock no-error.
 
   if available pt_mstr then
      temp_um = pt_mstr.pt_um.
   else
      temp_um = "".
 
   if ((available ptp_det    and ptp_iss_pol)
   or (not available ptp_det and available pt_mstr and pt_mstr.pt_iss_pol) )
   then do:
 
      {us/bbi/gprun.i ""icedit2.p""
         "(temp_trans,
           sr_site,
           sr_loc,
           substring(sr_lineid,4,18),
           sr_lotser,
           sr_ref,
           sr_qty,
           temp_um,
           """",
           """",
           output yn)"}
 
   end. /*IF AVAILABLE (PTP_DET */
 
   if yn then leave.
 
end. /* END OF FOR EACH                                          */
 
if yn then do:
   /* UNABLE TO ISSUE OR RECEIVE FOR ITEM */
   {us/bbi/pxmsg.i &MSGNUM=161 &ERRORLEVEL=3 &MSGARG1=substring(sr_lineid,4,18)}
end.
